package cn.lg.soar.flow.api.enums;

import cn.lg.soar.common.annotations.DictDefine;
import cn.lg.soar.common.data.dict.IDict;
import com.baomidou.mybatisplus.annotation.IEnum;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@DictDefine(name = "审批人类型")
public enum ApproverTypeEnum implements IDict<Integer>, IEnum<Integer> {

    // ========== 指定类 ==========
    SPECIFIED_USER("指定用户", 10),
    SPECIFIED_POST("指定岗位", 11),
    SPECIFIED_ROLE("指定角色", 12),

    // ========== 表单内选择 ==========
    FORM_USER("表单内用户", 20),
    FORM_POST("表单内岗位", 21),

    // ========== 发起人自选 ==========
    INITIATOR_SELECT_USER("发起人自选用户", 30),
    INITIATOR_SELECT_POST("发起人自选岗位", 31),

    // ========== 审批人自选 ==========
    APPROVER_SELECT_USER("审批人自选用户", 40),
    APPROVER_SELECT_POST("审批人自选岗位", 41),

    // ========== 发起人相关 ==========
    INITIATOR_DEPT_POST("发起人部门岗位", 51),
    INITIATOR_DEPT_ROLE("发起人部门角色", 52),

    // ========== 业务部门相关 ==========
    BUSINESS_DEPT_POST("业务部门岗位", 61),
    BUSINESS_DEPT_ROLE("业务部门角色", 62),
    ;

    ApproverTypeEnum(String label, int value){
        this.label = label;
        this.value = value;
    }

    private final String label;
    private final int value;
    @Override
    public Integer getValue() {
        return this.value;
    }
    @Override
    public String getLabel() {
        return this.label;
    }

}
